import { IPSSysMethodDTO } from './ipssys-method-dto';
import { IPSSysMethodDTOField } from './ipssys-method-dtofield';
import { PSModelObjectImpl } from '../psmodel-object-impl';

export class PSSysMethodDTOImpl extends PSModelObjectImpl implements IPSSysMethodDTO {
  get codeName(): string {
    return this.M.codeName;
  }

  get dynaModelFilePath(): string {
    return this.M.dynaModelFilePath;
  }

  get memo(): string {
    return this.M.memo;
  }

  get name(): string {
    return this.M.name;
  }

  protected pssysmethoddtofields: IPSSysMethodDTOField[] | null = null;

  getPSSysMethodDTOFields(): IPSSysMethodDTOField[] | null {
    if (this.pssysmethoddtofields == null) {
      this.pssysmethoddtofields = this.fillChildListModel(this.M.getPSSysMethodDTOFields, 'service.IPSSysMethodDTOField') as IPSSysMethodDTOField[];
    }
    return this.pssysmethoddtofields;
  }

  get psSysMethodDTOFields(): IPSSysMethodDTOField[] | null {
    return this.getPSSysMethodDTOFields();
  }

  findPSSysMethodDTOField(objKey: any): IPSSysMethodDTOField | null {
    return this.getPSModel5('service.IPSSysMethodDTOField', this.getPSSysMethodDTOFields(), objKey) as IPSSysMethodDTOField;
  }

  get sourceType(): 'DE' | 'DYNAMODEL' | 'DEACTIONINPUT' | 'DEFILTER' | 'REFDE' | 'DEDATASETINPUT' {
    return this.M.sourceType;
  }

  get type(): 'DEFAULT' | 'DEACTIONINPUT' | 'DEFILTER' | 'DEDATASETINPUT' {
    return this.M.type;
  }

  get userCat(): string {
    return this.M.userCat;
  }

  get userTag(): string {
    return this.M.userTag;
  }

  get userTag2(): string {
    return this.M.userTag2;
  }

  get userTag3(): string {
    return this.M.userTag3;
  }

  get userTag4(): string {
    return this.M.userTag4;
  }

  get cls(): string {
    return 'PSSysMethodDTOImpl';
  }

  instanceof(cls: string): boolean {
    if (cls == 'service.IPSSysMethodDTO') return true;
    return super.instanceof(cls);
  }
}
